<?php
/**
 * GioCMS
 * 
 * LICENSE
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-2.0.txt
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@ninhgio.com so we can send you a copy immediately.
 * 
 * @copyright	Copyright (c) 2010 Gio CMS (http://www.ninhgio.com)
 * @license		http://www.gnu.org/licenses/gpl-2.0.txt GNU GENERAL PUBLIC LICENSE Version 2
 */
?>
<?php if (isset($this->articles) && ($numArticles = count($this->articles)) > 0) : ?>
<div class="ninhgio">
	<div class="home_focusbox">
		<div align="left" id="home_focus" class="focus_left">
			<div class="nbtc">
    			<div class="topleft"><span></span></div>
    			<div class="topbg"><span></span></div>
    			<div class="topright"><span></span></div>
    			<div class="container">
        			<div class="maincontent">
            			<div>
            				<div>    
            					<div class="content">        
									<div class="row pdb5">
										<a href="<?php echo $this->url('news_article_details', $this->topArticle); ?>" class="title"><?php echo $this->topArticle['title']; ?></a>        
									</div>        
									<div class="row">
										<?php if (isset($this->topArticle['image_medium'])) : ?>   
										<a href="<?php echo $this->url('news_article_details', $this->topArticle); ?>">
											<img border="0" class="img" alt="<?php echo $this->STRING->escape($topArticle['title']); ?>" src="<?php echo $this->APP_RESOURCE_SERVER; ?><?php echo $this->topArticle['image_medium']; ?>" alt="picture" />
										</a>            
										<?php else : ?>
											<?php if (isset($this->topArticle['image_url'])) : ?> 
											<a href="<?php echo $this->url('news_article_details', $this->topArticle); ?>">
												<img border="0" class="img" alt="<?php echo $this->STRING->escape($this->topArticle['title']); ?>" src="<?php echo $this->topArticle['image_url']; ?>" alt="picture" />
											</a> 	
											<?php endif; ?>
										<?php endif; ?>
										<div class="sapo"><?php echo $this->STRING->subString($this->topArticle['description'], 30); ?></div>        
									</div>    
								</div>    
								<div class="home_filmtrip">        
									<div class="ft_line">&nbsp;</div>
									<div class="ft_items">
										<?php foreach ($this->articles as $index => $article) : ?>
										<?php if ($index > 0 && $index <= 3) : ?>
										<div class="item">
											<?php if (isset($article['image_general'])) : ?>  
											<a href="<?php echo $this->url('news_article_details', $article); ?>">
												<img style="width: 120px; height: 90px;" border="0" class="img" alt="<?php echo $this->STRING->escape($article['title']); ?>" src="<?php echo $this->APP_RESOURCE_SERVER; ?><?php echo $article['image_general']; ?>" alt="picture" />
											</a>         
											<?php else : ?>
												<?php if (isset($article['image_url'])) : ?> 
												<a href="<?php echo $this->url('news_article_details', $article); ?>">
													<img style="width: 120px; height: 90px;" border="0" class="img" alt="<?php echo $this->STRING->escape($article['title']); ?>" src="<?php echo $article['image_url']; ?>" alt="picture" />
												</a>   
												<?php endif; ?>
											<?php endif; ?>	            
											<div>                            
												<a href="<?php echo $this->url('news_article_details', $article); ?>" class="title"><?php echo $article['title']; ?></a>                                                    
											</div>                    
										</div>                                    
										<?php endif; ?>
										<?php endforeach; ?>                    
									</div>    
								</div>    
								<div id="divFocus" style="height: 0px;">&nbsp;</div>
							</div>
						</div>
						<div id="divFocus" style="height: 0px;">&nbsp;</div>
					</div>
    			</div>
    			<div class="bottomleft"><span></span></div>
    			<div class="bottombg"><span></span></div>
    			<div class="bottomright"><span></span></div>
			</div>
		</div>
		<div align="left" id="hotnews" class="hot_right">
			<div class="boxhotnews">
    			<div class="topheader">
        			<div class="left-conner">&nbsp;</div>
        			<div id="hot" class="hot">
            			<div class="left">&nbsp;</div>
            			<div class="title">
            				<div class="text">
            					<a href="javascript: void(0);"><?php echo $this->TRANSLATOR->widget('title'); ?></a>
            				</div>
            			</div>
            			<div class="title_right">&nbsp;</div>
        			</div>
        			<div id="comment" class="comment-inactive"></div>
        			<div class="bg"></div>
        			<div class="right">&nbsp;</div>
    			</div>
    			<div id="hotcontainer">
        			<div class="container">
            			<div id="hotnews-container" class="content">
            				<?php foreach ($this->articles as $index => $article) : ?>
							<?php if ($index > 3) : ?>
                    		<div class="row title">
                    			<a href="<?php echo $this->url('news_article_details', $article); ?>"><?php echo $article['title']; ?></a>
                    		</div>
                    		<?php if ($index < count($this->articles) - 1) : ?>
                   			<div class="separator"><span></span></div>
                   			<?php endif; ?>
                			<?php endif; ?>
							<?php endforeach; ?>
            			</div>
        			</div>
    			</div>
    			<div class="bottomleft"></div>
    			<div class="bottombg">&nbsp;</div>
    			<div class="bottomright"></div>
			</div>
		</div>
	</div>
</div>
<div class="clear"></div>
<?php endif; ?>